/**
 * 
 */
package com.java.test.user.dto;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

import org.springframework.jdbc.core.RowMapper;

/**
 * @author 存款记录 --审核成功的
 *
 */
public class DepositInfo implements RowMapper<DepositInfo> {

	// 主键id
	private int id;

	// 存款账号
	private String gameAccount;

	// 存款金额
	private double depositAmount;

	// 优惠金额
	private double discountAmount; ;
	
	
	// 存款时间
	private LocalDateTime depositTime;

	// 存款方式
	private int depositChannel;
	
	// 存款渠道
	private String depositChannelName;

	// 存款账号
	private String bankAccount;
	
	private String incomeAccount;

	// 审核状态(1:成功，2：失败)
	private int status;

	// 存款类型
	private int depositType;

	// 审核时间
	private LocalDateTime auditTime;

	// 审核人
	private String auditName;

	// 拒绝 备注
	private String content;
	
	
	
	
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getDepositChannelName() {
		return depositChannelName;
	}

	public void setDepositChannelName(String depositChannelName) {
		this.depositChannelName = depositChannelName;
	}

	public String getAuditName() {
		return auditName;
	}

	public void setAuditName(String auditName) {
		this.auditName = auditName;
	}

	public LocalDateTime getAuditTime() {
		return auditTime;
	}

	public void setAuditTime(LocalDateTime auditTime) {
		this.auditTime = auditTime;
	}

	public int getDepositType() {
		return depositType;
	}

	public void setDepositType(int depositType) {
		this.depositType = depositType;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getGameAccount() {
		return gameAccount;
	}

	public void setGameAccount(String gameAccount) {
		this.gameAccount = gameAccount;
	}

	public double getDepositAmount() {
		return depositAmount;
	}

	public void setDepositAmount(double depositAmount) {
		this.depositAmount = depositAmount;
	}

	public LocalDateTime getDepositTime() {
		return depositTime;
	}

	public void setDepositTime(LocalDateTime depositTime) {
		this.depositTime = depositTime;
	}

	public String getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getDepositChannel() {
		return depositChannel;
	}

	public void setDepositChannel(int depositChannel) {
		this.depositChannel = depositChannel;
	}

	public String getIncomeAccount() {
		return incomeAccount;
	}

	public void setIncomeAccount(String incomeAccount) {
		this.incomeAccount = incomeAccount;
	}

	// 查詢條件
	private String startTime;
	// 查詢條件
	private String endTime;
	// 当前日期
	private String curDate;
	
	

	public String getCurDate() {
		return curDate;
	}

	public void setCurDate(String curDate) {
		this.curDate = curDate;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	
	public double getDiscountAmount() {
		return discountAmount;
	}

	public void setDiscountAmount(double discountAmount) {
		this.discountAmount = discountAmount;
	}

	@Override
	public DepositInfo mapRow(ResultSet rs, int rowNum) throws SQLException {

		DepositInfo info = new DepositInfo();
		info.setId(rs.getInt("id"));
		info.setGameAccount(rs.getString("game_account"));
		info.setBankAccount(rs.getString("bank_account"));
		info.setStatus(rs.getInt("status"));
		info.setDepositAmount(rs.getDouble("deposit_amount"));
		info.setDepositTime(
				rs.getTimestamp("deposit_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		info.setDepositChannel(rs.getInt("deposit_channel"));
		info.setDepositType(rs.getInt("deposit_type"));
		info.setAuditTime(rs.getTimestamp("audit_time") == null ? null
				: rs.getTimestamp("audit_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());

		info.setAuditName(rs.getString("audit_name"));
		info.setDepositChannelName(rs.getString("deposit_channelname"));
		info.setIncomeAccount(rs.getString("income_account"));
		
		info.setContent(rs.getString("content"));
		info.setDiscountAmount(rs.getDouble("discount_amount"));

		return info;
	}

}
